package com.manong.mapper;

import com.manong.domain.Order;
import com.manong.query.OrderQueryObject;

import java.util.List;
import java.util.Map;

public interface OrderMapper {
    int deleteByPrimaryKey(Integer order_id);

    int insert(Order order);

    Order selectByPrimaryKey(Integer order_id);

    List<Order> selectAll();

    int updateByPrimaryKey(Order record);

    List<Order> selectForList(OrderQueryObject queryObject);

    Order selectOrderWithGoods(Integer order_id);

    int updateOrderStatus(Order orderToUpdate);

    int finishOrderStatus(Order orderToUpdate);

    List<Map<String, Object>> getDailyOrderCount();

    List<Map<String, Object>> getDailyOrderCountByOriginId(Integer originId);

    List<Map<String, Object>> getOrderStatusCountByOriginId(Integer originId);

    List<Map<String, Object>> getDailyOrderCountByOriginIdAndOrderType(Integer originId);

    List<Map<String, Object>> getOrderStatusCountByOriginIdAndOrderType(Integer originId);
}